from selenium import webdriver

option = webdriver.ChromeOptions()
option.add_argument('headless')
driver = webdriver.Chrome(executable_path='chromedriver', chrome_options=option)
driver.get("http://www.baidu.com")
page_src = driver.page_source
print(page_src)
driver.quit()
